﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using Phoenix.AppCode.Entities;
using Phoenix.AppCode.Data;
using System.Data;

namespace Phoenix.AppCode.Bussiness
{
    public class ArticleCategoryService
    {
        public ArticleCategoryService() 
        {
            //
            // TODO: Add constructor logic here
            //    
        }
        /// <summary>
        /// Create 
        /// </summary>
        /// <param name="articlecategory"></param>
        public static void Create(ArticleCategory articlecategory)
        {
            ArticleCategoryDAO articlecategoryDAO = new ArticleCategoryDAO();
            articlecategoryDAO.Create(articlecategory);
        }

        /// <summary>
        /// Edit
        /// </summary>
        /// <param name="articlecategory"></param>
        public static void Edit(ArticleCategory articlecategory)
        {
            ArticleCategoryDAO articlecategoryDAO = new ArticleCategoryDAO();
            articlecategoryDAO.Edit(articlecategory);
        }

        /// <summary>
        /// On/Off
        /// </summary>
        /// <param name="articlecategory"></param>
        public static void OnOff(ArticleCategory articlecategory)
        {
            ArticleCategoryDAO articlecategoryDAO = new ArticleCategoryDAO();
            articlecategoryDAO.OnOff(articlecategory);
        }

        /// <summary>
        /// Delete
        /// </summary>
        /// <param name="articlecategory"></param>
        public static void Delete(ArticleCategory articlecategory)
        {
            ArticleCategoryDAO articlecategoryDAO = new ArticleCategoryDAO();
            articlecategoryDAO.Delete(articlecategory);
        }

        /// <summary>
        /// Show all
        /// </summary>
        /// <param name="language"></param>
        /// <returns></returns>
        public static DataTable ArticleCategoryList(string language) {
            ArticleCategoryDAO articlecategoryDAO = new ArticleCategoryDAO();
            return articlecategoryDAO.ArticleCategoryList(language);
        }
        
        /// <summary>
        /// Show data by ID
        /// </summary>
        /// <param name="idarticlecategory"></param>
        /// <returns></returns>
        public static DataTable ArticleCategoryList_GetByID(int idarticlecategory)
        {
            ArticleCategoryDAO articlecategoryDAO = new ArticleCategoryDAO();
            return articlecategoryDAO.ArticleCategoryList_GetByID(idarticlecategory);
        }

        /// <summary>
        /// Get ID to edit or delete 
        /// </summary>
        /// <param name="idarticlecategory"></param>
        /// <returns></returns>
        public static ArticleCategory GetArticleCategoryByID(int idarticlecategory)
        {
            ArticleCategoryDAO articlecategoryDAO = new ArticleCategoryDAO();
            return articlecategoryDAO.GetArticleCategoryByID(idarticlecategory);
        }

    }
}